package com.edu.zhku.wms.vo;

import com.edu.zhku.wms.pojo.Employee;
import com.edu.zhku.wms.pojo.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author Feng
 * @since 2021/10/30 11:44
 */
@Data
public class UserInfo {

    @ApiModelProperty("已登录用户ID")
    private Integer userId;

    @ApiModelProperty(value = "已登录用户 用户名")
    private String username;

    @ApiModelProperty(value = "已登录用户 角色")
    private String role;

    @ApiModelProperty(value = "已登录用户 所绑定的员工")
    private Employee employee;

    public UserInfo(User user, Employee employee) {
        this.userId = user.getId();
        this.username = user.getUsername();
        this.role = user.getRole();
        this.employee = employee;
    }
}
